﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YXShop.IDAL.Shop;
using YXShop.DALFactory;

namespace YXShop.BLL.Shop
{
    public class ShopColor
    {
        private readonly IShopColor dal = DataAccess.CreateShopColor();

        #region DataBase Operation
        public int Add(YXShop.Model.Shop.ShopColor model)
        {
            return dal.Add(model);
        }
        public int Update(YXShop.Model.Shop.ShopColor model)
        {
            return dal.Update(model);
        }
        public void Delete(int id)
        {
            dal.Delete(id);
        }
        #endregion

        #region DataBase Load
        /// <summary>
        /// 查集合 可分页
        /// </summary>
        /// <param name="where">查询条件 ，为""null查所有</param>
        /// <returns></returns>
        public ChangeHope.DataBase.DataByPage GetList(string where)
        {
            return dal.GetList(where);
        }
        public List<YXShop.Model.Shop.ShopColor> GetALL(string where)
        {
            return dal.GetALL(where);
        }
        public YXShop.Model.Shop.ShopColor GetModel(int id)
        {
            return dal.GetModel(id);
        }
        #endregion
    }
}
